# This Python file uses the following encoding: utf-8
from django.db import models
from django.contrib.auth.models import User
from posts.models import Post

class VotPositiu(models.Model):
    usuari = models.ForeignKey( User )
    post = models.ForeignKey( Post )
    data =  models.DateTimeField(u'Moment votació',  auto_now_add = True )

    class Meta:
        unique_together = (("usuari", "post"),)
        db_table = u'vots_positius'
        verbose_name = u'Vot+'
        verbose_name_plural = u'Vots+'
    
class VotNegatiu(models.Model):
    usuari = models.ForeignKey( User )
    post = models.ForeignKey( Post )
    data =  models.DateTimeField(u'Moment votació',  auto_now_add = True )

    class Meta:
        unique_together = (("usuari", "post"),)
        db_table = u'vots_negatius'
        verbose_name = u'Vot-'
        verbose_name_plural = u'Vots-'
    
